#include"reactor.hpp"
#include"listener.hpp"
#include "Master.hpp"
//  启动方式:  ./server 端口号 
//  比如:      ./server 8888
int main(int argc,char* argv[]){
    if(argc<2){
        LOG(ERROR)<<"USAGE: ./server port";
        return USAGE_ERR;
    }
    uint16_t port=std::stoi(argv[1]);
    Master master(port);

    int slaver_cnt=3;
    for(int i=0;i<slaver_cnt;i++){
        master.MakeSlaver();
    }
    master.start();
    return 0;
}